//
//  DotsView.h
//  SecretAlbums
//
//  Created by BabyFinancial on 15/5/22.
//  Copyright (c) 2015年 BabyFinancial. All rights reserved.
//
//  显示Dots同时负责保存输入中的密码
//

#import <UIKit/UIKit.h>
#import "CircleButton.h"

@class DotsView;

@protocol DotsViewDelegate <NSObject>

@optional
/** 当密码输入完成时调用，返回YES:密码正确、NO:密码失败 */
- (BOOL)verifyPassword:(NSString *)password FromDotsView:(DotsView *)dotsView;
/** 当密码正确时延时调用 */
- (void)successPassword:(NSString *)password FromDotsView:(DotsView *)dotsView;

@end

@interface DotsView : UIView

@property (nonatomic, strong, readonly) NSMutableString *password;
@property (nonatomic, assign) id<DotsViewDelegate> delegate;

- (void)setupPassWord:(NSString *)passWord;
- (void)cleanPassWord;
- (instancetype)initWithAmount:(NSUInteger)amount;
/** 当按钮被点击时触发，执行保存输入中密码的操作 */
- (void)operateFromCircleButton:(CircleButton *)circleButton;

@end
